﻿using Newtonsoft.Json;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 
    /// </summary>
    public class ThresholdData
    {
        [JsonProperty("id"), JsonPropertyName("id")]
        public long Id { get; set; }

        /// <summary>
        /// 分组Id
        /// </summary>
        [JsonProperty("group_id"), JsonPropertyName("group_id")]
        public long GroupId { get; set; }

        /// <summary>
        /// 标签名称
        /// </summary>
        [JsonProperty("name"), JsonPropertyName("name")] 
        public string Name { get; set; }

        /// <summary>
        /// 阈值类型(全部，标签类型，标签)
        /// </summary>
        [JsonProperty("threshold_type"), JsonPropertyName("threshold_type")]
        public int ThresholdType { get; set; }

        /// <summary>
        /// 开始值
        /// </summary>
        [JsonProperty("start_value"), JsonPropertyName("start_value")]
        public double StartValue { get; set; }

        /// <summary>
        /// 结束值
        /// </summary>
        [JsonProperty("end_value"), JsonPropertyName("end_value")]
        public double EndValue { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [JsonProperty("remark"), JsonPropertyName("remark")]
        public string Remark { get; set; }

        /// <summary>
        /// 明细列表
        /// </summary>
        public List<ThresholdDetail> Details { get; set; } = new List<ThresholdDetail>();
    }
}
